﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


class LettersFromTheAlphabet 
{
    static void Main()
    {
        try
        {
            List<char> alphabetList= new List<char>();           
            for (int i = 65; i < 91; i++)
            {
                alphabetList.Add(Convert.ToChar(i));               
            }
            for (int j = 97; j < 123; j++)
            {
                alphabetList.Add(Convert.ToChar(j));
            }
            string text = "CSharp programming!";
            text.ToCharArray();
            for (int k = 0; k < text.Length; k++)
            {
                for (int index = 0; index < alphabetList.Count; index++)
                {
                    if (text[k] == alphabetList[index])
                    {
                        Console.WriteLine("Index: {0, 2} -> letter: {1}", index, alphabetList[index]);
                    }
                }
            }
            
        }
        catch (Exception)
        {
            Console.WriteLine("Wrong Data!");
            return;
        }
    }
}